const { usersModel } = require("../models/usersModel");
<<<<<<< HEAD
async function register(req,res,next) {
    let user= await usersModel.create(req.body);
    console.log(user);
    if (user) {
            res.send({ "message": "新增成功", code: 200 ,user })
          } else {
            res.send({ "message": "新增失败", code: -1 })
    }
}
module.exports = {
    register
=======
async function register(req, res, next) {
  let { userPhone, passWord }=req.body
  let user = await usersModel.create({ userPhone, passWord });
  console.log(user);
  if (user) {
    res.send({ "message": "新增成功", code: 200, user })
  } else {
    res.send({ "message": "新增失败", code: -1 })
  }
}

module.exports = {
  register
>>>>>>> dx
}